package cn.zyq.charging.order;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;

//在启动类上添加此注解，是让springBoot帮忙开启feignClients
//多个client(就是创建多个UserClient接口的实例<比如启动多个服务提供者charging-user>)
//feign就会通过负载均衡策略调用charging-user
//@EnableFeignClients注解可以设置扫描包的设置basePackages
//(如果不设置则默认扫描启动类ChargingOrderApp所在的包)
@EnableFeignClients(basePackages = {"cn.zyq.charging.order.feign"})
@SpringBootApplication
public class ChargingOrderApp {
    public static void main(String[] args) {
        SpringApplication.run(ChargingOrderApp.class, args);
    }
}

//注意：@EnableFeignClients注解的具体内容如下：
//@Import({FeignClientsRegistrar.class})  //FeignClientsRegistrar是feign的注册器。
//public @interface EnableFeignClients {}